'''

def func1(a):#形式参数
    xxxx
    return
func1(b)#实际参数


class roel:
    def __init__(self,a,b)
        self.a=a
        self.b=b
    def sum(self):
        print(self.a+self.b)

roel
'''
#返回值
'''def func2(a):
    if a:
        return 2
    else:
        return 0'''
#函数调用函数
'''def func2(a,b):
    c=func3(a,b)
    return 2*c

def func3(c,d):
    if c>d :
        return c
    else:
        return d'''
#
'''class Compare:
    def __init__(self,a,b):
        self.a=a
        self.b=b

    def func3(self):
        if self.a>self.b:
            print(self.a)
        else:
            print(self.b)
        return (self.a+self.b)
    def func4(self):
        d=Compare(self.a,self.b).func3()
        print(d)

if __name__=='__main__':
    Compare(3,5)
    Compare(3,5).func3()
    Compare(3,5).func4()'''
'''
def func5(*args,**kwargs):
    print(args,type(args))
    print(kwargs,type(kwargs))
'''

'''def sum(*a):
    sum1=0
    for i in a:
        sum1=sum1+i
    return sum1'''

'''def func1(*a,**kwargs):
    print(a)
    print(kwargs)
func1(0,100,3.14,True,"abcd",[10,20,30],name="班长",age=25)'''
#普通的函数
'''
def func():
    return 0
type(func)
'''
#直接通过类名调用类内非静态函数
'''
class role(object):
    def func():
        return 'hello'
'''
#类内声明函数,通过类访问funcB为function,通过实例则为method
class role:
    def funcB(self):
        return 1
type(role.funcB)
type(role().funcB)

role.funcB(None)
role.funcB(role())
role().funcB()











